#.新建“exerc1”Python文件完成作业：幼儿园体检要对小朋友们的体重做评估，
#对超出平均体重的小朋友需要提示他们进行锻炼。‪‬‪‬‪‬‪‬‪‬‮‬‭‬‫‬‪‬‪‬‪‬‪‬‪‬‮‬‫‬‪‬‪‬‪‬‪‬‪‬‪‬‮‬‭‬‪‬‪‬‪‬‪‬‪‬‪‬‮‬‪‬‮‬‪‬‪‬‪‬‪‬‪‬‮‬‪‬‫‬
#编程实现：输入若干个体重，输出比平均体重更重的那些体重。输入输出形式见示例说明。‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬


def getWeight():  # 获取体重值
    weightValue=[]
    inputStr=input("请输入小朋友的体重（按回车键结束）：")
    while inputStr!="":
        weightValue.append(eval(inputStr))
        inputStr=input("请输入小朋友的体重（按回车键结束）：")
    return weightValue

def avgWeight(weight):#计算平均体重
    sum=0.0
    for i in weight:
        sum=sum+i
    return sum/len(weight)

def printWeight(weight):
    num=avgWeight(weight)
    for i in weight:
        if i>num:
            print(i)
            
printWeight(getWeight())

